<!--{template common/header}-->
<div id="pt" class="bm cl">
	<div class="z">
		<a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em>
		<a href="plugin.php?id=dzapp_zhibo">{lang dzapp_zhibo:zhibo}</a> <em>&rsaquo;</em>
		<a href="plugin.php?id=dzapp_zhibo&mod=zhibocp">{lang dzapp_zhibo:zhibocp}</a> <em>&rsaquo;</em>
		{lang dzapp_zhibo:gift}
	</div>
</div>
<div id="ct" class="ct2_a wp cl">
	<div class="mn">
		<div class="bm bw0">
			<!--{if $op == 'list'}-->
			<ul class="tb mbm cl">				
				<li class="a"><a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift">{lang dzapp_zhibo:gift}</a></li>
				<li><a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=order">{lang dzapp_zhibo:gift_list}</a></li>
				<li class="o y"><a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=post">{lang dzapp_zhibo:gift_add}</a></li>
			</ul>

			<form name="cateform" method="post" action="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift">
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<input type="hidden" name="listsubmit" value="true" />
				<table cellspacing="0" cellpadding="0" class="dt mtm">
					<tr class="th">
						<th class="c"></th>
						<th>{lang dzapp_zhibo:name}</th>
						<th width="70">{lang dzapp_zhibo:icon}</th>
						<th width="70">{lang dzapp_zhibo:price}</th>
						<th style="text-align:center;width:60px">{lang dzapp_zhibo:operation}</th>
					</tr>
					<!--{loop $list $value}-->
					<tr>
						<td><input type="checkbox" name="delete[]" class="pc" value="$value[gift_id]" /></td>
						<td>$value[name]</td>
						<td><img src="{$value[icon]}" width="30"></td>
						<td>$value[price]</td>
						<td style="text-align:center">
							<a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=post&gift_id=$value[gift_id]">{lang dzapp_zhibo:edit}</a>
						</td>
					</tr>
					<!--{/loop}-->
					<tr class="bw0_all">
						<td><input type="checkbox" name="chkall" id="chkall" class="pc" onclick="checkall(this.form)" /><label for="chkall">{lang dzapp_zhibo:del}</label></td>
						<td colspan="20"><button type="submit" name="submit" id="submit" class="pn" value="true"><strong>{lang submit}</strong></button></td>
					</tr>
				</table>
			</form>
			<!--{if $multipage}--><div class="page cl">$multipage</div><!--{/if}-->
			<!--{elseif $op == 'order'}-->
			<ul class="tb mbm cl">				
				<li><a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift">{lang dzapp_zhibo:gift}</a></li>
				<li class="a"><a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=order">{lang dzapp_zhibo:gift_list}</a></li>
				<li class="y">
					<form method="post" action="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=order">
						{lang dzapp_zhibo:activity_number}
						<input type="text" name="activity_id" value="{$_GET[activity_id]}" style="width:80px">
						{lang dzapp_zhibo:gift_giver}
						<input type="text" name="username" value="{$_GET[username]}" style="width:80px">
						<button type="submit" class="pn pnp"><strong>{lang dzapp_zhibo:search}</strong></button>
					</form>
				</li>
			</ul>

			<form name="cateform" method="post" action="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift">
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<input type="hidden" name="listsubmit" value="true" />
				<table cellspacing="0" cellpadding="0" class="dt mtm">
					<tr class="th">
						<th class="c"></th>
						<th>{lang dzapp_zhibo:gift_giver}</th>
						<th>{lang dzapp_zhibo:activity}</th>
						<th>{lang dzapp_zhibo:gift}</th>
						<th>{lang dzapp_zhibo:price}</th>
						<th>{lang dzapp_zhibo:giving_time}</th>
					</tr>
					<!--{loop $list $value}-->
					<tr>
						<td></td>
						<td>$value[username]</td>
						<td>$activity[$value[activity_id]][name]</td>
						<td>$gift[$value[gift_id]][name]</td>
						<td>$value[price]</td>
						<td>
							$value[dateline]
						</td>
					</tr>
					<!--{/loop}-->
				</table>
			</form>
			<!--{if $multipage}--><div class="page cl">$multipage</div><!--{/if}-->
			<!--{else}-->
			<ul class="tb mbm cl">
				<!--{if $gift[gift_id]}-->
				<li class="a"><a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=post&gift_id=$_GET[gift_id]">{lang dzapp_zhibo:gift_edit}</a></li>
				<!--{else}-->
				<li class="a"><a href="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=post">{lang dzapp_zhibo:gift_add}</a></li>
				<!--{/if}-->
			</ul>
			<script type="text/javascript" src="{$_G[setting][jspath]}calendar.js?{VERHASH}"></script>
			<form name="activityform" method="post" action="plugin.php?id=dzapp_zhibo&mod=zhibocp&ac=gift&op=post" onsubmit="return validate(this)" enctype="multipart/form-data">
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<input type="hidden" name="gift_id" value="$gift[gift_id]" />
				<input type="hidden" name="giftsubmit" value="true" />
				<table cellspacing="0" cellpadding="0" class="tfm">
					<tr>
						<th><strong class="rq y">*</strong><label for="name">{lang dzapp_zhibo:name}</label></th>
						<td><input type="text" name="name" id="name" class="px" value="$gift[name]" /></td>
					</tr>
					<tr>
						<th><label for="icon">{lang dzapp_zhibo:icon}</label></th>
						<td>
							<input type="file" name="icon" id="icon" class="pf" />
							<!--{if $gift[icon]}--><p class="mtn"><img height="75" src="$gift[icon]?{TIMESTAMP}" /></p><!--{/if}-->
						</td>
					</tr>
					<tr>
						<th><label for="price">{lang dzapp_zhibo:price}</label></th>
						<td><input type="text" name="price" id="price" class="px" style="width:55px" value="$gift[price]" /></td>
					</tr>
					<tr>
						<th></th>
						<td><button type="submit" class="pn pnp"><strong>{lang submit}</strong></button></td>
					</tr>
				</table>
			</form>
			<script type="text/javascript">
			function validate(theform) {
				if(theform.name.value == '') {
					alert('{lang dzapp_zhibo:name_validate}');theform.name.focus();return false;
				}
			}
			</script>
			<!--{/if}-->
		</div>
	</div>
	<div class="appl">
		<!--{subtemplate dzapp_zhibo:zhibocp_nav}-->
	</div>
</div>
<!--{template common/footer}-->